package com.server.questionbank.snframe.config.ollama;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.client.WebClient;

@Configuration
@Data
public class OllamaConfig {
    @Value("${ollama.url}")
    private String ollamaUrl;
    @Value("${ollama.vectorModelName}")
    private String vectorModelName;
    @Value("${ollama.reasoningModelName}")
    private String reasoningModelName;


    // 创建一个WebClient实例，用于与Ollama进行通信
    @Bean
    public WebClient webClient() {
        return WebClient.builder().baseUrl(ollamaUrl).build();
    }
}
